from django.db import models

# Create your models here.
class tg_qudao(models.Model):
    name = models.CharField(max_length=20, verbose_name='渠道名称')
    tg_leixing= models.ForeignKey('tg_leixing', on_delete=models.CASCADE, verbose_name='来源')

    def __str__(self):
        return self.name

    class Meta:

        verbose_name = '推广渠道'
        verbose_name_plural = '推广渠道'

class tg_leixing(models.Model):
    name = models.CharField(max_length=20, verbose_name='推广账号')
    leixing_laiyuan_choices=(
        (1,'线上'),
        (2,'线下'),
    )
    leixing_laiyuan=models.SmallIntegerField(verbose_name='推广账号来源',choices=leixing_laiyuan_choices,default=1) #推广类型来源线上或线下
    def __str__(self):
        return self.name
    class Meta:

        verbose_name = '推广账号'
        verbose_name_plural = '推广账号'

